package com.jihu.design.creatation.builder;

/**
 * @author jihu
 * @date 2021/9/16
 */
public class MainTest {

    public static void main(String[] args) {
        AbstractBuilder builder = new XiaoMiBuilder();

//        builder.customCpu("骁龙888");
//        builder.customMem("16G");
//        builder.customDisk("1T");
//        builder.customCam("2亿");
        //链式调用
        builder.customCpu("骁龙888")
               .customMem("16G")
               .customDisk("1T")
               .customCam("2亿");

        Phone product = builder.getProduct();
        System.out.println(product);

        Phone build = Phone.builder()
                .cpu("1")
                .cam("2")
                .disk("3")
                .mem("4").build();



    }
}
